/*	
 *				
 *					ISNW ---- It is a war.It is not warcraft!
 *
 *
 *					Author:					zhoukeli(haxixi_keli)
 *					Filename:				ISNW_Text.h
 *					CreateTime:				2008/11/29
 *					ModifyTime:				2008/11/29
 *
 */

#ifndef ISNW_TEXT_H
#define ISNW_TEXT_H

#include "../ISNW_CtrlInterface/ISNW_CtrlInterface.h"
#include "../../ISNW_Font/ISNW_Font.h"
#include "../../ISNW_d3d/ISNW_d3dinclude.h"

namespace ISNW
{
	class ISNW_Text : public ISNW_CtrlInterface
	{
	public:
		ISNW_Text();
		~ISNW_Text();

	public:
		ISNW_VOID Init();
		
		ISNW_VOID Create();

		ISNW_VOID SetText(ISNW_StringBaby sb){m_mesh.SetText(sb);}

		ISNW_VOID Release();

		ISNW_VOID Render();

		ISNW_VOID SetTexture(ISNW_StringBaby sb){
			m_texture.SetFileSrc(sb);
		}

		ISNW_VOID SetColor(D3DCOLORVALUE v){
			m_material.SetColor(ISNW_Material::ISNW_MATERIAL_SET_AMBIENT,v);
			m_material.SetColor(ISNW_Material::ISNW_MATERIAL_SET_DIFFUSE,v);
			m_material.SetColor(ISNW_Material::ISNW_MATERIAL_SET_EMISSIVE,v);
			m_material.SetColor(ISNW_Material::ISNW_MATERIAL_SET_SPECULAR,v);
			m_material.SetPower(1);
		}

	protected:
		ISNW_Mesh		m_mesh;

		ISNW_Material	m_material;

		ISNW_Texture	m_texture;
	};
}
#endif